package base.day04;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
//        判断奇偶数
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入整数；");
        int i = sc.nextInt();
        if (i % 2 == 0) {
            System.out.println(i + "偶数");
        } else {
            System.out.println(i + "奇数");
        }

        System.out.println("-------------------------------------------------------------------");


        Scanner sc2 = new Scanner(System.in);
        System.out.println("手机的价格是：");
        double new_phone_money = sc2.nextInt();
//        以旧换新8折
        double discount_phone = new_phone_money * 0.8;
//        旧手机置换-1500元
        double sell_old_phone = new_phone_money - 1500;
        if (discount_phone < sell_old_phone) {
            System.out.println("建议以旧换新");
        } else {
            System.out.println("建议卖掉旧手机买新的");
        }

        System.out.println("------------------------------------------------------------------");
        //判断成绩优秀，良好，一般，及格，不及格
        Scanner sc3=new Scanner(System.in);
        System.out.println("请输入你的成绩：");
        int score=sc3.nextInt();
        if (score>=90){
            System.out.println("优秀");
        }else {
            if (score>=80){
                System.out.println("良好");
            }else{
                if(score>=70){
                    System.out.println("一般");
                }else{
                    if (score>=60){
                        System.out.println("及格");
                    }else {
                        System.out.println("不及格");
                    }
                }
            }
        }
        System.out.println("------------------------------------------------------------------");
        //switch语句
        Scanner sc4=new Scanner(System.in);
        System.out.println("请输入星期数：");
        int week= sc4.nextInt();
        switch (week){
            case 1:
                System.out.println("跑步,学java");
                break;
            case 2:
                System.out.println("游泳,学java");
                break;
            case 3:
                System.out.println("篮球,学java");
                break;
            case 4:
                System.out.println("足球,学java");
                break;
            case 5:
                System.out.println("学java");
                break;
            case 6:
                System.out.println("学java");
                break;
            case 7:
                System.out.println("学java");
                break;
            default:
                System.out.println("输入有误，请重新输入");
        }

    }
}
